import request from '@/router/axios'

export function inventoryDetailFetchList (query) {
  return request({
    url: '/eims/storage/page',
    method: 'get',
    params: query
  })
}

export function getGoodsStorage(query) {
  return request({
    url: '/eims/storage/getGoodsStorageStockIdByPage',
    method: 'get',
    params: query
  })
}

// 销售单配镜时，分页查询商品信息
export function getGlassStorageSaleByPage(query) {
  return request({
    url: '/eims/storage/getGlassStorageSaleByPage',
    method: 'get',
    params: query
  })
}


// 盘亏时，分页查询商品信息
export function getStorageCheckInfo(query) {
  return request({
    url: '/eims/storage/getStorageCheckPage',
    method: 'get',
    params: query
  })
}


// 库存查询-库存综合查询
export function getcomprehensiveCheckPage(query) {
  return request({
    url: '/eims/storage/comprehensiveCheckPage',
    method: 'get',
    params: query
  })
}

// 库存查询-任意时段商品库存查询
export function getGoodsQuantityByTime(query){
  return request({
    url: '/eims/storage/pageByTime',
    method: 'get',
    params: query
  })
}


// 库存查询-库存综合查询-统计商品数量
export function getGoodsNumberSum(query) {
  return request({
    url: '/eims/storage/getGoodsNumberSum',
    method: 'post',
    data: query
  })
}

//  库存查询-库存实时查询-统计商品总数量
export function getStorageGoodsNumberSum(query) {
  return request({
    url: '/eims/storage/getStorageGoodsNumberSum',
    method: 'get',
    params: query
  })
}


export function getGoodsInfoByGoodsBarcode (data) {
  return request({
    url: '/eims/storage/getStorageInfoByGoodsBarcode',
    method: 'get',
    params: data
  })
}


// 库存查询-库存综合查询-打印按钮
export function storageComprehensiveCheckExport(query) {
  return request({
    url: '/eims/storage/storageComprehensiveCheckExport/excel',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}



//  库存查询-每月月底库存查询
export function getMonthStoragePage(query) {
  return request({
    url: '/eims/storagebeginmonth/page',
    method: 'get',
    params: query
  })
}

//  库存查询-每月月底库存查询-统计商品总数量
export function getStorageMonthGoodsNumberSum(query) {
  return request({
    url: '/eims/storagebeginmonth/getStorageGoodsNumberSum',
    method: 'get',
    params: query
  })
}

  // 库存查询-每月月底库存excel模式导出
  export function getBeginOfMonthStorageExport(query) {
    return request({
      url: '/eims/storagebeginmonth/getBeginOfMonthStorageExport/excel',
      method: 'post',
      data: query,
      responseType: 'blob'
    })
  }